this._resolveOnIdleId = 0;
this._iconSizeUpdateResolveCbs = [];
+
+ this._childrenMaxSize = -1;
}
_findBestIconSize() {
}
_getChildrenMaxSize() {
- let minWidth = 0;
- let minHeight = 0;
+ if (this._childrenMaxSize === -1) {
+ let minWidth = 0;
+ let minHeight = 0;
- for (const child of this._container) {
- if (!child.visible)
- continue;
+ for (const child of this._container) {
+ if (!child.visible)
+ continue;
- const [childMinHeight] = child.get_preferred_height(-1);
- const [childMinWidth] = child.get_preferred_width(-1);
+ const [childMinHeight] = child.get_preferred_height(-1);
+ const [childMinWidth] = child.get_preferred_width(-1);
- minWidth = Math.max(minWidth, childMinWidth);
- minHeight = Math.max(minHeight, childMinHeight);
+ minWidth = Math.max(minWidth, childMinWidth);
+ minHeight = Math.max(minHeight, childMinHeight);
+ }
+
+ this._childrenMaxSize = Math.max(minWidth, minHeight);
}
- return Math.max(minWidth, minHeight);
+ return this._childrenMaxSize;
}
_getVisibleChildrenForPage(pageIndex) {
item.disconnect(itemData.destroyId);
item.disconnect(itemData.visibleId);
+ item.disconnect(itemData.queueRelayoutId);
this._items.delete(item);
}
else if (!this.allowIncompletePages)
this._fillItemVacancies(itemData.pageIndex);
}),
+ queueRelayoutId: item.connect('queue-relayout', () => {
+ this._childrenMaxSize = -1;
+ }),
});
item.icon.setIconSize(this._iconSize);